package com.huang.controller;

import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author han
 * @since 2022-01-09 16:52:29
 */
@Log4j2
@RestController
@RefreshScope
public class ConfigController {

    @Value("${spring.cloud.gateway.discovery.locator.enabled}")
    private String info;

    @GetMapping("config")
    public String getConfig() {
        log.info("ConfigController===> : {}", info);
        return "===>>>" + info;
    }
}
